﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Net.Sockets;

namespace Spore.Utils
{
  public  class VisualClient
    {
     public  NetClient client;
     private int id;
      public VisualClient()
      {
            
      }

      public VisualClient(int id)
      {
          this.id = id;
      }


      public void Connect()
      {
          Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
          socket.Connect(new IPEndPoint(IPAddress.Loopback, 8056));
          
          client = new NetClient(socket,new DTOTypeConverter());
          client.Open();
          //for(int i=0;i<2;i++)
          //{
          //    Dto dto = new Dto(120, new MyClass());
          //    client.WriteData(dto);
          //}
          //client.Close();
      }

      
    }
}
